package uk.ac.man.cs.mig.util.graph.event;

import java.util.ArrayList;

/**
 * User: matthewhorridge<br>
 * The Univeristy Of Manchester<br>
 * Medical Informatics Group<br>
 * Date: Jan 12, 2004<br><br>
 * 
 * matthew.horridge@cs.man.ac.uk<br>
 * www.cs.man.ac.uk/~horridgm<br><br>
 *
 */
public class VisualisedObjectManagerEvent
{
	private Object source;
	private ArrayList objectsList;

	/**
	 * Constructs a <code>VisualisedObjectManagerEvent</code> that
	 * holds information relating to an event that was generated by
	 * a <code>VisualisedObjectManager</code>.
	 * @param source The <code>VisualisedObjectManager</code> that generated the event.
	 * @param objectsList The objects pertaining to the event.
	 */
	public VisualisedObjectManagerEvent(Object source, ArrayList objectsList)
	{
		this.source = source;

		this.objectsList = objectsList;
	}

	/**
	 * Gets the objects associated with the event
	 * @return A list of the objects that the event is associated with.  For example
	 * if the event was an 'object added event' then this method would
	 * return the objects that were added.
	 */
	public ArrayList getObjects()
	{
		return objectsList;
	}

	/**
	 * Gets the source of the event.
	 * @return The <code>VisualisedClassManager</code> that generated the event.
	 */
	public Object getSource()
	{
		return source;
	}
}
